import request from '@/utils/request'

// 查询用户记录表列表
export function listUserRecord (query) {
  return request({
    url: '/platform/userRecord/list',
    method: 'get',
    params: query
  })
}

// 查询用户记录表详细
export function getUserRecord (id) {
  return request({
    url: '/platform/userRecord/' + id,
    method: 'get'
  })
}

// 查询用户记录表详细
export function getUserRecordByOnlineUser () {
  return request({
    url: '/platform/userRecord/userRecordByOnlineUser',
    method: 'get'
  })
}


// 新增用户记录表
export function addUserRecord (data) {
  return request({
    url: '/platform/userRecord',
    method: 'post',
    data: data
  })
}

// 修改用户记录表
export function updateUserRecord (data) {
  return request({
    url: '/platform/userRecord',
    method: 'put',
    data: data
  })
}

// 删除用户记录表
export function delUserRecord (id) {
  return request({
    url: '/platform/userRecord/' + id,
    method: 'delete'
  })
}


// 导出用户记录表
export function exportUserRecord (query) {
  return request({
    url: '/platform/userRecord/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/platform/userRecord/getInitData/' + dictTypes,
    method: 'get'
  })
}
